<template>
  <div>
    <div @click="show">
      <div class="mian">
        <div>
          <img
            src="@/assets/tasty.png"
            alt=""
            class="tasty"
            @click="tasty"
          >
        </div>
        <div @click="show">
          <img
            src="@/assets/tou.png"
            alt=""
            class="tou"
          >
        </div>
      </div>
      <div
        v-show="isShow"
        class="user"
      >
        <div class="round1">
          中
        </div>
        <div class="round2">
          EN
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      isShow: false,
    };
  },
  methods: {
    tasty() {
      this.$router.push('/restaurant');
    },
    show() {
      this.isShow = true;
    },
  },
};
</script>

<style lang="scss" scoped>
.mian {
    width: 100vw;
    height: 50px;
    display: flex;
    margin-top: 30px;
    // justify-content: space-around;
}

img {
    width: 40px;
    height: 40px;
}

.tasty {
    margin-left: 250px;
}

.tou {
    margin-left: 900px;
    // position: relative;
}

.user {
    width: 140px;
    height: 70px;
    position: absolute;
    top: 80px;
    right: 430px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 1px 1px 4px 1px gray;
}

.round1,.round2 {
    width: 30px;
    height: 30px;
    font-size: 10px;
    line-height: 30px;
    border: 1px solid black;
    border-radius: 50%;
}

.round1 {
    color: white;
    background-color: black;
}

.round2 {
    color: black;
    background-color: white;
}
</style>
